home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 25
/
CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso
/
CUCD
/
WWW
/
http
/
www.wirenet.co.uk
/
files
/
Dashboard2.lha
/
Dashboard2
/
AmiTCP
/
bin
/
ShowLog
< prev
next >
Wrap
Text File
|
1998-03-27
|
2KB
|
62 lines
/*
$VER: ShowLog 2.0 (26.3.98)
(c) Neil Bothwick
Adds contents of temporary logfile from Send/GetTCP to the
permanent log, and displays the result lines in a requester
Adding to Information conference moved to a separate script
To enable this, set "rexx/Log2Info.br" as your system enter
script in Thor's System preferences.
*/
MainLog = 'UUSpool:Connect.log' /* Name of main logfile to copy to, leave blank if you don't want a copy */
LogFile = 'UUSpool:Info.log'
/* Don't change anything below here */
options results
address command
parse arg TempLog Switches
if ~exists(TempLog) then exit
if symbol('MainLog') = 'VAR' & MainLog > '' then 'type' TempLog '>>'MainLog
if pos('LOG',upper(switches)) > 0 then 'type' TempLog '>>'LogFile
if ~open(log,TempLog,'R') then exit
drop MsgData.
MsgData.TEXT.COUNT = 0
body = ''
do while ~eof(log)
line = compress(readln(log),'"')
if word(line,3) ~= 'STARTUP' & word(line,3) ~= 'EXIT' then do
if body > '' & line > '' then body = body'0a'x
line = compress(substr(line,39),'0d'x)
body = body||line
MsgData.TEXT.COUNT = MsgData.TEXT.COUNT + 1
interpret 'MsgData.TEXT.'MsgData.TEXT.COUNT '= line'
end
end
call close(log)
if pos('REQ',upper(switches)) > 0 then do
do while length(body) > 450
split = lastpos('0a'x, left(body,450))
interpret 'parse var body 1 reqpart' split 'dump +1 body'
call ShowReq(reqpart)
end
call ShowReq(body)
end
'delete >NIL:' TempLog
exit
ShowReq:
parse arg str
if str > '' then call rtezrequest(str,' OK ','Status Report','rt_reqpos = reqpos_centerscr')
return 0